package com.hyper_yang.javase.reflection_annotation.reflect;

public class Student {
    String name;
    Integer age;
    Double score;
    Double weight;

    Student() {
        System.out.println("无参构造");
    }

    private Student(String name) {
        System.out.println("1参构造");
        this.name = name;
    }

    protected Student(String name, Integer age) {
        System.out.println("2参构造");
        this.name = name;
        this.age = age;
    }

    public Student(String name, Integer age, Double score) {
        System.out.println("3参构造");
        this.name = name;
        this.age = age;
        this.score = score;
    }

    public Student(String name, Integer age, Double score, Double weight) {
        System.out.println("全参构造");
        this.name = name;
        this.age = age;
        this.score = score;
        this.weight = weight;
    }

    @Override
    public String toString() {
        return "Student{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", score=" + score +
                ", weight=" + weight +
                '}';
    }
}

